package com.panda.order.service.impl;

import java.util.List;
import com.panda.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.panda.order.mapper.TPandaOrderBuyerMapper;
import com.panda.order.domain.TPandaOrderBuyer;
import com.panda.order.service.ITPandaOrderBuyerService;

/**
 * 淘宝买家信息Service业务层处理
 * 
 * @author panda
 * @date 2021-03-14
 */
@Service
public class TPandaOrderBuyerServiceImpl implements ITPandaOrderBuyerService 
{
    @Autowired
    private TPandaOrderBuyerMapper tPandaOrderBuyerMapper;

    /**
     * 查询淘宝买家信息
     * 
     * @param id 淘宝买家信息ID
     * @return 淘宝买家信息
     */
    @Override
    public TPandaOrderBuyer selectTPandaOrderBuyerById(Long id)
    {
        return tPandaOrderBuyerMapper.selectTPandaOrderBuyerById(id);
    }

    /**
     * 查询淘宝买家信息列表
     * 
     * @param tPandaOrderBuyer 淘宝买家信息
     * @return 淘宝买家信息
     */
    @Override
    public List<TPandaOrderBuyer> selectTPandaOrderBuyerList(TPandaOrderBuyer tPandaOrderBuyer)
    {
        return tPandaOrderBuyerMapper.selectTPandaOrderBuyerList(tPandaOrderBuyer);
    }

    /**
     * 新增淘宝买家信息
     * 
     * @param tPandaOrderBuyer 淘宝买家信息
     * @return 结果
     */
    @Override
    public int insertTPandaOrderBuyer(TPandaOrderBuyer tPandaOrderBuyer)
    {
        tPandaOrderBuyer.setCreateTime(DateUtils.getNowDate());
        return tPandaOrderBuyerMapper.insertTPandaOrderBuyer(tPandaOrderBuyer);
    }

    /**
     * 修改淘宝买家信息
     * 
     * @param tPandaOrderBuyer 淘宝买家信息
     * @return 结果
     */
    @Override
    public int updateTPandaOrderBuyer(TPandaOrderBuyer tPandaOrderBuyer)
    {
        tPandaOrderBuyer.setUpdateTime(DateUtils.getNowDate());
        return tPandaOrderBuyerMapper.updateTPandaOrderBuyer(tPandaOrderBuyer);
    }

    /**
     * 批量删除淘宝买家信息
     * 
     * @param ids 需要删除的淘宝买家信息ID
     * @return 结果
     */
    @Override
    public int deleteTPandaOrderBuyerByIds(Long[] ids)
    {
        return tPandaOrderBuyerMapper.deleteTPandaOrderBuyerByIds(ids);
    }

    /**
     * 删除淘宝买家信息信息
     * 
     * @param id 淘宝买家信息ID
     * @return 结果
     */
    @Override
    public int deleteTPandaOrderBuyerById(Long id)
    {
        return tPandaOrderBuyerMapper.deleteTPandaOrderBuyerById(id);
    }

    @Override
    public int deleteTPandaOrderBuyerByTid(String tid) {
        return tPandaOrderBuyerMapper.deleteTPandaOrderBuyerByTid(tid);
    }
}
